package com.app.model;

import com.app.bean.User;

/**
 * Created by ${zyj} on 2016/3/25.
 */
public class UserModelImpl implements  UserModel  {

    @Override
    public void login(final String name, final String pass, final LoadListener loadListener) {
        //模拟子线程耗时操作
         loadListener.start();
        if ( "www".equals( name ) && "123".equals( pass )){
            User user = new User() ;
            user.setName( name ) ;
            user.setPass( pass );
            loadListener.success( user );
        }else {
            loadListener.fail();
        }
        loadListener.end();
    }
}
